perm filename GUIDE.VIS[VIS,HPM]10 blob
sn#265353 filedate 1977-02-22 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00004 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 Guide to vision routines on [VIS,HPM]
C00008 00003 VIXHDR.SAI for displaying grey scale and halftone pictures on data disc.
C00010 00004 Internal picture array format
C00012 ENDMK
C⊗;
Guide to vision routines on [VIS,HPM]
PIXHDR.SAI utility routines for getting, saving, moving, etc. pictures
requires: PIXFAI.REL,PIXSAI.REL
provides:
PCLN,PCWD,PCBY,PCBYA,LNWD,LNBY, where to find things in
LNBYA,WDBY,WDBI,BYBI,BPTAB,LINTAB picture arrays
VALUE ← PIXEL(PICTURE,ROW,COLUMN); value of a particular pixel
PUTEL(PICTURE,ROW,COLUMN,VALUE); change a pixel
ADDEL(PICTURE,ROW,COLUMN,VALUE); increment a pixel
SIZE ← PFLDIM(FILNAME); size of array needed for pic file
SIZE ← GETPFL(FILNAME,PICTURE); read in a pic file
PUTPFL(PICTURE,FILENAME); write out PICTURE
SIZE ← PIXDIM(HEIGHT,WIDTH,BITS); size of array for HxWxB picture
SIZE ← MAKPIX(HEIGHT,WIDTH,BITS,PICTURE); make skeleton HxWxB picture
WIPE(PICTURE,VALU(0)); make every data word (not byte!) =VALU
pixtrn(src,tr,dest); transforms src into dst by array tr.
tr is a 3x3 real array. For all pixels (y,x) in dest
set (ty,tx,foo) ← (y,x,1) * transform. if (ty,tx) is
in src then dest(y,x) ← src(ty,tx);
COPPIC(PICTURE1,PICTURE2); copy pic1 to pic2
HAFPIC(PICTURE1,PICTURE2,MAXBIT); reduce pic to half resolution
SHRINK(PICT1,PICT2); squeeze or expand PICT1 into PICT2
SELECT(PICTURE1,YEDGE,XEDGE,PICTURE2); take a piece of a pic
PICADD(PICTURE,PICSUM); add a picture to a picture
PICSH(PIC1,PIC2,DIV); every pixel in PIC1/DIV→PIC2
GRAY(PIC); Convert to gray code.
UNGRAY(PIC); Convert back.
NRETRY ← CAMPIX(CAMERA,YEDGE,XEDGE,PICTURE,
SUMS(1),BCLIP(7),TCLIP(0),MAXTRY(20)); read from a camera
NRETRY ← CLPADJ(CAM,BLCIP,TCLIP); find optimum clip levels for CAM
NRETRY ← TVSNAP(CAM,YEDG,XEDG,PIC,BCLIP,TCLIP,NTRY); primitive camera
NRETRY ← TVRAW(CAM,YEDG,XEDG,PIC,BCLIP,TCLIP,NTRY); routines, used by
TVBTMX(PIC4,PICN,XFRM); CAMPIX
SUM ← INTOP(PIC,WINSIZE,ANSARRY,YEDGE(0),XEDGE(0));interest operator
INTLOM(HIG,WID,ANSARRY); intop local max operator
SIZE ← INTERESTDIM(PICTURE,WINDOWSIZE); pic size needed for intrst op
INTEREST(PICTURE,WINDOW,RESULTPICTURE); make interest op picture
BESTVAL ← MATCH(PICTURE1,SY1,SX1,SY2,SX2, PICTURE2,DY1,DX1,DY2,DX2);
BSTCOEF ← NORCOR(PICTURE1,SY1,SX1,SY2,SX2, PICTURE2,DY1,DX1,DY2,DX2);
;correlators, find Source window in pic1 in Dest in pic2
CLEAN(PICTURE); remove single pixel noise, blurs a little
PASSHI(PICTURE1,WINDOWSIZE,PICTURE2); high pass filter
SUM ← CMPPAR(PICTURE1,PICTURE2); compare two pics [ sig(x-y)↑2 ]
PERBIT(PICTURE, TRANSFORM); transform each pixel of pic
HISTOG(PICTURE, HISTOGRAM); count # of occurences of each gray val
ENHANCE(PICTURE); make histogram flat
SYNCHRONIZE(PICTURE1); do a vertical roll fixup
ROWSUM(PICTURE1,ROWSUMS); sum up the pixels in each row
ROWSUD(PICTURE1,ROWSUMS); dirty rowsums, one pixel/word used
COLSUM(PICTURE1,COLSUMS); sum up the pixels in each col
MASS ← CENTRO(PIC,YL,XL,XH,XH,THR); centroid and moment of a dark area
UNPACK(SOURCEARRAY, PICTURE); copy a pict into a full wd array
GETPAR(ARRY, PICTR); copy full word array of pixels to pic
EDGEINIT(PICTURE,SIZE); initialize edge operator
EDGE(X,Y,EDGERESULT); apply edge operator
NOTE: all picture and other arrays are zero origin in all dimensions
VIXHDR.SAI for displaying grey scale and halftone pictures on data disc.
an extension for the display routines in DDSUB.SAI[GRA,HPM]
requires: PIXHDR.SAI[VIS],DDHDR.SAI[GRA],VIXFAI.REL[VIS]
provides: VIDEO(X1,Y1,X2,Y2,PICTURE,BIT);
VID(X1,Y1,X2,Y2,PICTURE,BIT);
display PICTURE between X1,Y1,X2,Y2 in SCREEN
co-ordinates. If BIT=-1 then a fast, low quality
halftone, if -2 then a high quality halftone, if
-3 then a buggy halftone. If positive then BIT
represents a bit mask, which is anded with each
pixel. If the result is nonzero, a bit is turned
on in the corresponding part of the display.
Internal picture array format
WORD CONTENTS
0 PCLN number of scanlines in the picture
1 PCWD words in the pixel portion of the picture
2 PCBY valid bytes in the picture
3 PCBYA bytes in the picture, including null
bytes at end of each scanline
4 LNWD words per scanline
5 LNBY valid bytes per scanline
6 LNBYA bytes per scanline, including the nulls
7 WDBY bytes per word
8 WDBI bits in the valid portion of each word
9 BYBI bits per byte
10 BMAX 2↑BYBI-1, the maximum value of a byte
11 BPTAB address of SECOND entry in byte pointer
table 12+PCLN+address of array
12 to 11+PCLN LINTAB table containg the actual address of the first
word of each scanline, in obvious order
12+PCLN to table containing byte pointers to samples within
12+PCLN+LNBYA lines, to be added to line address.
The first entry, when ILDB'ed causes
loading of the first byte in the line.
13+PCLN+LNBYA to the picture
12+PCLN+LNBYA+PCWD